from django.db import models


# Create your models here.
class Book(models.Model):
    # 订单id
    b_id = models.CharField(verbose_name='Book_id', max_length=100, default='')
    # 用户id
    u_id = models.CharField(verbose_name='U_id', max_length=100)
    # 设备id
    e_id = models.CharField(verbose_name='E_id', max_length=100)
    # 订单提交时间
    subscribe_date = models.DateTimeField(verbose_name='Subscribe_Date')
    # 订单预期结束时间
    expire_date = models.DateTimeField(verbose_name='Expire_Date')
    # 订单实际结束时间
    end_time = models.DateTimeField(verbose_name='End_time', null=True)
    # 剩余续订次数
    extend = models.IntegerField(verbose_name='Extend', default=3)
    # 订单状态，是否已经结束
    b_status = models.BooleanField(verbose_name='Status', default=True)

    class Meta:
        db_table = 'hwb_book'
